package com.boot.unity.api.wx.controller;

import com.boot.unity.api.wx.service.WxNewsService;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@RestController
@RequestMapping("/wx/news")
@Validated
public class WxNewsController {
    private final Log logger = LogFactory.getLog(WxNewsController.class);
    @Autowired
    private WxNewsService wxNewsService;

    @PostMapping("/queryNewsAll")
    public Object queryNewsAll(@RequestBody String type){
        return wxNewsService.queryNewsAll(type);
    }
    @PostMapping("/queryNewsById")
    public Object queryNewsById(@RequestBody String id){
        return wxNewsService.queryNewsById(id);
    }
}
